import axios from "./axios";
export const user_Login = (data) => {
    return axios({
        url: 'http://localhost:3000/login',
        method: 'post',
        data: data
    })
}

export const user_list = () => {
    return axios({
        method: 'get',
        url: '/big/v1.0/api/student/list',
        params: { limit: 10}
    })
}
// 获取列表信息 
export const employ_list = (data:Object) => {
    return axios({
        method: 'get',
        url: '/big/v1.0/api/student/list',
        params: { limit: 60 ,...data}
    })
}
// 新增 
export const employ_add = (data: Object) => {
    return axios({
        method: 'post',
        url: '/big/v1.0/api/student',
        data
    })
}
// 修改 
export const employ_edit = (data: Object) => {
    return axios({
        method: 'put',
        url: '/big/v1.0/api/student',
        data
    })
}
// 查看 
export const employ_deltail = (id: number) => {
    return axios({
        method: 'get',
        url: '/big/v1.0/api/student/id',
        params: { id }
    })
}

// 删除 
export const employ_delete=(id:number)=>{
    return axios({
        method:'delete',
        url:'/big/v1.0/api/delete',
        params:{
            'id[]':id
        }
    })
}
// 智能检测 
export const Intell_list=()=>{
    return axios({
        method:'get',
        url:'/big/v1.0/api/intelligentDetection/dataitem'
    })
}

// 导入 
export const Intell_Daoenter=(data)=>{
    return axios({
        method:'post',
        url:'/big/v1.0/api/import/students',
        data
    })
}

// 安防数据 
export const Security_list=()=>{
    return axios({
        method:'get',
        url:'/big/v1.0/api/intelligentDetection/datapp'
    })
}

// 设备运维 
export const Equipment_list=()=>{
    return axios({
        method:'get',
        url:'/big/v1.0/api/intelligentDetection/dataput',
    })
}
// 获取地图数据 
export const MapData_list=(adcode)=>{
    return axios({
        method:'get',
        url:`https://geo.datav.aliyun.com/areas_v3/bound/${adcode}_full.json`
    })
}

export const MapBox_data=(adcode:number)=>{
    return axios({
        method:'get',
        url:`https://geo.datav.aliyun.com/areas_v3/bound/${adcode}_full.json`
    })
}